package com.dt.common.enums;

public enum EventType {

    Purchase("购买","101"),Test("测试回调接口是否有返回","188"),StructureChange("组织架构变动","201"),ApplicationAble("应用停用/启用","202")
    ,DirectoryUpload("目录上传","301"),DirectoryUpdating("目录更新","302"),EquipmentChange("设备状态变化","303"),DirectoryDeletion("目录删除","304");

    //中文名称
    private String name;
    //编码
    private String code;

    private EventType(String name, String code) {
        this.name = name;
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public static EventType getEnum(String code) {
        for (EventType emu : EventType.values()) {
            if (emu.code.equals(code)) {
                return emu;
            }
        }
        return null;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
    
}
